/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.oa.entity;

import org.hibernate.validator.constraints.Length;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 科目Entity
 * @author Michael
 * @version 2017-07-31
 */
public class Subject extends DataEntity<Subject> {
	
	private static final long serialVersionUID = 1L;
	private String code;		// 科目编号
	private String name;		// 科目名称
	private String money;
	private String sum;			//总和
	private String details;//明细
	public Subject() {
		super();
	}

	public Subject(String id){
		super(id);
	}

	@Length(min=0, max=64, message="科目编号长度必须介于 0 和 64 之间")
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}
	
	@Length(min=0, max=64, message="科目名称长度必须介于 0 和 64 之间")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getMoney() {
		return money == null ? "0":money;
	}

	public void setMoney(String money) {
		this.money = money;
	}

	public String getSum() {
		return sum == null ? "0":sum;
	}

	public void setSum(String sum) {
		this.sum = sum;
	}

	public String getDetails() {
		return details;
	}

	public void setDetails(String details) {
		this.details = details;
	}
}